<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link th:href="@{/js/layui/css/layui.css}" rel="stylesheet"/>
</head>
<body class="layui-layout-body">

        <form class="layui-form" action="">

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                </div>
            </div>
        </form>
        <script>
            //Demo
            layui.use('form', function(){
                var form = layui.form;
                //监听提交
                form.on('submit(formDemo)', function(data){
                    $.post(
                        "getArrange",
                        $(data.form).serialize(),
                        function (obj) {
                            if (obj.code == 1) {
                                layer.msg(obj.msg, {time: 1500}, function () {
                                    window.location.href = 'arrange_remove';
                                });
                            }
                            else {
                                layer.msg(obj.msg, {time: 1500, anim: 6});
                            }
                        }
                    );
                    return false;
                });
            });
        </script>
</body>
</html>
